#define  _CRT_SECURE_NO_WARNINGS
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        for (int cur = 0, dest = 0; cur < nums.size(); cur++)
            if (nums[cur] != 0)
                swap(nums[dest++], nums[cur]);
    }
};